home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / FADE2.ZIP / FADEDEMO.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-11-27  |  1.1 KB  |  37 lines

  1. PROGRAM FadeDemo;
  2.  
  3. USES CRT,     { <----- We need this for keypressed and colors. }
  4.      Fade2;
  5.  
  6. VAR
  7.    loop : integer;
  8.    ch : char;
  9. BEGIN
  10.    FOR loop := 1 to 50 DO
  11.       BEGIN
  12.          TextColor(loop MOD 16);
  13.          write ('...Writing junk to screen...')
  14.       END;
  15.    writeln;
  16.    TextColor(15);
  17.    writeln ('Press any key to stop fading, then press');
  18.    writeln ('<Enter> to call ResetTextMode;');
  19.    GrabPal;                          { Save palette to return to later. }
  20.    REPEAT
  21.       FadeOut;
  22.       FadeIn;
  23.    UNTIL KeyPressed;
  24.    BlackOut;
  25.    ClrScr;
  26.    TextColor(7);
  27.    writeln ('This screen was set up when the palette was black, so there');
  28.    writeln ('was no way to see it being set up.  GrabPal would usually be');
  29.    writeln ('called right before this, but in this case we already had the');
  30.    writeln ('palette stored from earlier.  Press Enter again to ResetTextMode.');
  31.    readln;   { <--- The above text doesn't show until after this readln }
  32.    FadeIn;
  33.    readln;
  34.    ResetTextMode;
  35.    write ('That was cool!');
  36.    readln
  37. END.